home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / Musique / Quod Libet / quodlibet-3.3.0-installer.exe / bin / quodlibet / qltk / logging.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2014-12-31  |  2KB  |  41 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.7)
  3.  
  4. from gi.repository import Gtk
  5. import quodlibet.util.logging as quodlibet
  6. from quodlibet import qltk
  7. from quodlibet.util import connect_obj
  8.  
  9. class LoggingWindow(qltk.Window):
  10.     
  11.     def __init__(self, parent = None):
  12.         super(LoggingWindow, self).__init__()
  13.         self.set_default_size(400, 400)
  14.         self.set_title(_('Output Log'))
  15.         self.set_border_width(12)
  16.         self.set_transient_for(qltk.get_top_parent(parent))
  17.         notebook = qltk.Notebook()
  18.         for logname in quodlibet.util.logging.names():
  19.             text = '\n'.join(quodlibet.util.logging.contents(logname))
  20.             view = Gtk.TextView()
  21.             sw = Gtk.ScrolledWindow()
  22.             sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
  23.             sw.set_shadow_type(Gtk.ShadowType.IN)
  24.             sw.add(view)
  25.             buffer = view.get_buffer()
  26.             buffer.set_text(text)
  27.             notebook.append_page(sw, logname)
  28.         
  29.         close = Gtk.Button(stock = Gtk.STOCK_CLOSE)
  30.         connect_obj(close, 'clicked', (lambda x: x.destroy()), self)
  31.         button_box = Gtk.HButtonBox()
  32.         button_box.set_layout(Gtk.ButtonBoxStyle.END)
  33.         button_box.pack_start(close, True, True, 0)
  34.         vbox = Gtk.VBox(spacing = 12)
  35.         vbox.pack_start(notebook, True, True, 0)
  36.         vbox.pack_start(button_box, False, True, 0)
  37.         self.add(vbox)
  38.         self.get_child().show_all()
  39.  
  40.  
  41.